<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //JSON对象属性名使用双引号引起来
        // var stu = {
        //     "name": '高伟杰',
        //     "age": 18
        // }
        // console.log(stu.age);

        var stus = [
            {
                "id": 101,
                "name": '大哥',
                "action": {
                    "s": '辽宁',
                    "x": '葫芦岛'
                }
            },
            {
                "id": 102,
                "name": '二哥',
                "action": {
                    "s": '辽宁',
                    "x": '葫芦岛'
                }
            },
            {
                "id": 103,
                "name": '三哥',
                "action": {
                    "s": '辽宁',
                    "x": '葫芦岛'
                }
            }
        ]
            
        for(var i = 0;i<stus.length;i++){
            // console.log(stus[i].action.s);
            
            for(var x in stus[i]){
                console.log(stus[i]+'的属性'+x+'为'+stus[i][x]);
            }
        }
    </script>
</head>

<body>

</body>

</html>